package com.cimpm.task.service.impl;

import com.cimpm.task.entity.TaskFlow;
import com.cimpm.task.entity.TaskInstance;
import com.hby.common.callback.AutoProcessControllerPart;
import com.hby.common.entities.aspect.parameter.ParamConverter;
import com.hby.common.entities.aspect.parameter.ServiceInfo;
import com.hby.common.services.Impl.mian.AutoEntityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TaskInstanceServiceImpl extends AutoEntityServiceImpl<TaskInstance> {

    @Autowired
    private TaskFlowServiceImpl taskFlowService;



    public Object createInstance(ParamConverter param, Integer userId, String userName) throws Throwable{
        Integer flowId = param.getInt("flowId");
        TaskFlow taskFlow = taskFlowService.getEntityFromId(flowId);
        taskFlow.getType();
        return null;
    }

    @Override
    public void customService(AutoProcessControllerPart autoProcessControllerPart, ServiceInfo serviceInfo) throws Throwable {

    }
}
